package com.bishe.demo.modules.tourism.controller;


import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Description TourismController
 * @Author Lubb
 * @Date 2021/3/29 18:24
 */
@Controller
public class TourismController {

    @GetMapping("/tourism/route")
    public String route(ModelMap modelMap) {
        modelMap.put("template","reception/tourism/route/route");
        return "reception/tourism/index";
    }

    @GetMapping("/tourism/routeDetail")
    public String routeDetail(ModelMap modelMap) {
        modelMap.put("template","reception/tourism/route/routeDetail");
        return "reception/tourism/index";
    }

    @GetMapping("/tourism/routeAdd")
    @RequiresRoles(value = {"旅行社","管理员"},logical = Logical.OR)
    public String routeAdd(ModelMap modelMap) {
        modelMap.put("template","reception/tourism/route/routeAdd");
        return "reception/tourism/index";
    }

    @GetMapping("/tourism/login")
    public String test() {
        return "reception/tourism/account/signin";
    }

    @GetMapping("/tourism/register")
    public String register(){
        return "reception/tourism/account/signup";
    }

    @GetMapping("/tourism/myOrder")
    public String myOrder() {
        return "reception/tourism/route/myOrder";
    }
}
